This AppleScript™ takes the contents of a cell in a Microsoft Excel™ spreadsheet and places the BarCode equivalent graphic into a picture box on the same sheet:
tell application "Microsoft Excel"
Activate
Select Range "R1C1"
set FormulaR1C1 of ActiveCell to "'5012345678900"
Select Range "R1C1"
CopyObject Selection
end tell
tell application "Scorpion BarCode"
activate
macro "MENU Encode EAN-13"
macro "CLCK Field 1"
macro "MENU Edit Paste Data"
macro "BUTN Press Clip"
macro "BUTN Press OK"
macro "MENU File Quit"
quit
end tell
tell application "Microsoft Excel"
Activate
Select Range "R1C1"
set FormulaR1C1 of ActiveCell to ""
paste
Select DrawingObject "Picture 1" of ActiveSheet
set LineStyle of Border of Selection to xlNone
set Shadow of Selection to false
set ColorIndex of Interior of Selection to xlAutomatic
set Left of Selection to 190.0
set Top of Selection to 77.0
Select Range "R1C1"
end tell
The script was created using the ScriptEditor™ program supplied with AppleScript™ system software. The Scorpion BarCode software supports the Script Recording feature within ScriptEditor™ enabling you to create scripts easily and quickly!
Please note that references to various known trademarks or registered trademarks of Apple Computer Inc and Microsoft Corporation have been made in this document. Such references do not imply any endorsement of, or other affiliations with, Scorpion Research Limited or vice versa. The reference to the known trademarks or registered trademarks names is in an editorial fashion only, and to the benefit of the trademark holder and owner, with no intention of infringement of the trademark.